<template>
<div>
  <h1>v-on练习</h1>
  <div>你的金钱:{{num}}</div>
  <button @click="fn">过520</button>
  <button @click="fn1(100,'zs')">板砖100</button>
  <button @click="fn1(5000,'ls')">卖身5000</button>
</div>
</template>

<script>
export default {
data () {
    return {
        num:1000
    }
},
methods: {
    fn() {
     this.num -=520
 },
 fn1(num,name) {
     console.log(num,name);
     this.num +=num
 }
 
}
}
</script>

<style>

</style>